﻿using Bootstrap.Template.Container;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Bootstrap.Control
{
    [ToolboxData("<{0}:BootstrapContainer runat=server></{0}:BootstrapContainer>")]
    public class BootstrapContainer : Panel
    {
        #region Properties

        public string style { get; set; }

        #endregion

        #region Methods

        public override void RenderBeginTag(System.Web.UI.HtmlTextWriter writer)
        {
            base.RenderBeginTag(writer);

            BootstrapContainerBeginTempalte template = new BootstrapContainerBeginTempalte();

            template.CssClass = this.CssClass;

            template.Style = style;

            writer.Write(template.TransformText());
        }

        public override void RenderEndTag(System.Web.UI.HtmlTextWriter writer)
        {
            base.RenderEndTag(writer);

            BootstrapContainerEndTempalte tempalte = new BootstrapContainerEndTempalte();

            writer.Write(tempalte.TransformText());

        }

        #endregion
    }
}
